package two;

public class zuoye1 {
	public static void main(String[] args) {
		int arr[] = { 1, 2, 3, 4 };
		int arrMax = arr[0];
		int arrMin = arr[0];
		for (int i = 0; i < arr.length; i++) {
			if (arr[i] > arrMax) {
				arrMax = arr[i];
			}
			if (arr[i] < arrMin) {
				arrMin = arr[i];
			}

		}
		System.out.println("ֵ最大值" + arrMax);
		System.out.println("最小值" + arrMin);
	}

}
